<div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
        <div class="layui-logo" lay-href="/home">
            <span>{{ $app_name }}</span>
        </div>
        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
            @forelse($model as $item)
                <li data-name="home" class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:;" lay-tips="{{ $item['name'] }}" lay-direction="2"  @if(empty($item['child'])) lay-href="{{ $item['link']??'' }}" @endif>
                    <i class="layui-icon {{ $item['icon']??'' }}"></i><cite>{{ $item['name'] }}</cite></a>
                    {{--二级菜单,目前支持二级--}}
                    @if(!empty($item['child']))
                        <dl class="layui-nav-child">
                            @foreach($item['child'] as $child)
                                <dd data-name="list"><a lay-href="{{ $child['link'] }}">{{ $child['name'] }}</a></dd>
                            @endforeach
                        </dl>
                    @endif
                </li>
            @empty
                暂无导航
            @endforelse
        </ul>
    </div>
</div>
